function HandlePageBackendSource(gui, operater, now, options) {
  this._gui = gui;
  this._operator = operater;
  this._now = now;
  this._options = options;
    
  this._createElements();
};

HandlePageBackendSource.prototype._createElements = function() {
  this._loadData();
};

HandlePageBackendSource.prototype._loadData = function() {
  this._source = null;
  this._retrieveSource();
};

HandlePageBackendSource.prototype._verifyData = function() {
  if (this._source) {
    this._updateElements();
  }
};

HandlePageBackendSource.prototype._retrieveSource = function(page, condition, date, from, to, pos) {
  var _self = this;
  if (this._options.id) {
   /* new RequestUtils()._read('isource', null, 'd.oid = ' + this._options.id, null, null, null, null, function(result, params) { _self._source = (result.data.length == 1) ? result.data[0] : null;
                                                                                                                                _self._verifyData.call(_self);
                                                                                                                              }, null);*/
  var args = '&oid=' + this._options.id; 
  new RequestUtils()._mysql('isource', args, function(result, params) { _self._source = (result.data.length == 1) ? result.data[0] : null;
                                                                          _self._verifyData.call(_self);
                                                                        }, {php:'customphp/mysqlread.php'}); 
                                                                                                                              
  } else {
    this._source = ISource.instance();
    this._verifyData();
  }
};

HandlePageBackendSource.prototype._updateElements = function() {
  var _self = this;

  this._gui.source.value = this._source.name;
  this._gui.source.onchange = function() { _self._source.name = this.value; };
  
  this._gui.save.onclick = function() { if (_self._source.name == '') { 
                                          window.alert('名称不能为空'); 
                                        } else { 
                                          new RequestUtils()._mwrite('isource', [_self._source], [], function() { history.back(); }, null); };
                                        }
  this._gui.cancel.onclick = function() { history.back(); };
};

